<div class="row">
    <div class="col-md-12 text-center">
        <nav aria-label="Page navigation">
            <ul class="pagination">
                {foreach from="$main.pager" item="item" name="item"}
                {if $smarty.foreach.item.first}
                <li{if $p==$item.p} class="disabled"{/if}>
                    <a href="{if $p==$item.p}javascript:;{else}{$item.link}{/if}" aria-label="Previous" title="{$item.title}">
                        <span aria-hidden="true">&laquo;</span>
                    </a>
                </li>
                {/if}
                {if !$smarty.foreach.item.first && !$smarty.foreach.item.last}
                <li{if $p==$item.p} class="active"{/if}>
                    <a href="{if $p==$item.p}javascript:;{else}{$item.link}{/if}" title="{$item.title}">{$item.p}</a>
                </li>
                {/if}
                {if $smarty.foreach.item.last}
                <li{if $p==$item.p} class="disabled"{/if}>
                    <a href="{if $p==$item.p}javascript:;{else}{$item.link}{/if}" aria-label="Next" title="{$item.title}">
                        <span aria-hidden="true">&raquo;</span>
                    </a>
                </li>
                {/if}
                {/foreach}
            </ul>
        </nav>
    </div>
</div>